package com.training.admin.entity.report;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.training.admin.entity.trainer.Trainer;

/**
 * 项目报表
 * @author Rockett
 *
 */
public class TrainerReport {
	/**
	 * ID
	 */
    private Long id;
    
    /**
     * 讲师姓名
     */
    private String name;
    /**
     * 讲师编号
     */
    private String code;
    /**
     * 讲师邮箱
     */
    private String email;
    /**
     * 是否认证
     */
    private boolean certified;
    /**
     * 讲师类型
     */
    private String trainerType;
	/**
	 * 讲师级别
	 */
    private String trainerLevel;
    
    /** 认证日期 */
     private Date certifiedDate;
    
    /** 授课时长 */
    private int trainingHour;
    /** 满意度 */
    private String satisfaction;
    
    private boolean disabled;

    /**
     * 标准课程集合
     */
    private String courses;

    
    public TrainerReport(){
    	this.disabled=false;
    }
    public TrainerReport(Trainer trainer){
    	this.certified=trainer.isCertified();
    	this.certifiedDate=trainer.getCertifiedDate();
    	this.code=trainer.getCode();
    	this.disabled=trainer.isDisabled();
    	this.email=trainer.getEmail();
    	this.id=trainer.getId();
    	this.name=trainer.getName();
    	this.satisfaction=trainer.getSatisfaction();
    	this.trainerLevel=trainer.getTrainerLevel();
    	this.trainerType=trainer.getTrainerType();
    	this.trainingHour=trainer.getTrainingHour();
    			
    }
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the certified
	 */
	public boolean isCertified() {
		return certified;
	}

	/**
	 * @param certified the certified to set
	 */
	public void setCertified(boolean certified) {
		this.certified = certified;
	}

	/**
	 * @return the trainerType
	 */
	public String getTrainerType() {
		return trainerType;
	}

	/**
	 * @param trainerType the trainerType to set
	 */
	public void setTrainerType(String trainerType) {
		this.trainerType = trainerType;
	}

	/**
	 * @return the trainerLevel
	 */
	public String getTrainerLevel() {
		return trainerLevel;
	}

	/**
	 * @param trainerLevel the trainerLevel to set
	 */
	public void setTrainerLevel(String trainerLevel) {
		this.trainerLevel = trainerLevel;
	}

	/**
	 * @return the certifiedDate
	 */
	public Date getCertifiedDate() {
		return certifiedDate;
	}

	/**
	 * @param certifiedDate the certifiedDate to set
	 */
	public void setCertifiedDate(Date certifiedDate) {
		this.certifiedDate = certifiedDate;
	}

	/**
	 * @return the trainingHour
	 */
	public int getTrainingHour() {
		return trainingHour;
	}

	/**
	 * @param trainingHour the trainingHour to set
	 */
	public void setTrainingHour(int trainingHour) {
		this.trainingHour = trainingHour;
	}

	/**
	 * @return the satisfaction
	 */
	public String getSatisfaction() {
		return satisfaction;
	}

	/**
	 * @param satisfaction the satisfaction to set
	 */
	public void setSatisfaction(String satisfaction) {
		this.satisfaction = satisfaction;
	}

	/**
	 * @return the courses
	 */
	public String getCourses() {
		return courses;
	}

	/**
	 * @param courses the courses to set
	 */
	public void setCourses(String courses) {
		this.courses = courses;
	}
	/**
	 * @return the disabled
	 */
	public boolean isDisabled() {
		return disabled;
	}
	/**
	 * @param disabled the disabled to set
	 */
	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}
	/**
	 *  是否认证 true-->是、false-->否
	 * @return
	 */
	public String getCertifiedStr(){
		if(this.certified){
			return "是";
		}else{
			return "否";
		}
	}
	/**
	 * 认证时间格式化
	 * @return
	 */
	public String getCertifiedDateStr(){
    	SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    	return dateFormat.format(this.certifiedDate);
	}

	
}
